<template>
  <div id="app">
    <el-backtop></el-backtop>
    <top :active="active" @menuSelect="menuSelect"></top>
    <div id="float-win">
      <el-popover class="item" placement="left" width="200" trigger="hover">
        <div class="float-me">
          <p>联系我们</p>
          <el-divider style="margin: 0;"></el-divider>
          <div>
            <i class="icon iconfont icon-dianhua"></i>
            <div>
              <p>电话客服：400-0592-528</p>
              <p>工作时间：9：00-22：00</p>
            </div>
          </div>
        </div>
        <div slot="reference">
          <i class="icon iconfont icon-erji"></i>
          <p>在线咨询</p>
        </div>
      </el-popover>
      <el-divider></el-divider>
      <el-popover class="item" placement="left" width="230" trigger="hover">
        <div class="float-me">
          <p>请拨打 400-0592-528 进行试用申请</p>
        </div>
        <div slot="reference">
          <i class="icon iconfont icon-mianfei"></i>
          <p>免费试用</p>
        </div>
      </el-popover>
      <!-- <div class="item">
        <i class="icon iconfont icon-mianfei"></i>
        <p>免费试用</p>
      </div> -->
      <el-divider></el-divider>
      <el-popover class="item" placement="left" width="150" trigger="hover">
        <div class="qr-code">
          <div>
            <img src="./assets/img/index/公众号二维码.png" alt="" />
            <p>扫码关注公众号</p>
          </div>
          <el-divider></el-divider>
          <div>
            <img src="./assets/img/index/APP二维码.png" alt="" />
            <p>扫码下载APP</p>
          </div>
        </div>
        <div slot="reference">
          <i class="icon iconfont icon-erweima"></i>
          <p>关注</p>
        </div>
      </el-popover>
    </div>
    <router-view @menuSelect="menuSelect" />
    <bottom></bottom>
  </div>
</template>

<script>
import top from "./components/top";
import bottom from "./components/bottom";
export default {
  name: "App",
  components: {
    top,
    bottom
  },
  methods: {
    menuSelect(index) {
      if (this.$route.path == `/${index}`) return;
      this.$router.push("/" + index);
    }
  },
  computed: {
    active: {
      get() {
        return this.$route.path.split("/")[1];
      },
      set(val) {}
    }
  }
};
</script>

<style lang="scss">
#app {
  min-width: 1000px;
  overflow: hidden;
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
}
</style>
